<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
 Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="Node.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>Node.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'Node.js'<BR/><BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="draw2d/Node.html">draw2d.Node</a></b></td>
    <td>A Node is the base class for all figures which can have <a href="../draw2d/Port.html#">draw2d.Port</a>s.</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/* This notice must be untouched at all times.

FreeGroup Draw2D 0.9.26
The latest version is available at
http://www.freegroup.de

Copyright (c) 2006 Andreas Herz. All rights reserved.
Created 5. 11. 2006 by Andreas Herz (Web: http://www.freegroup.de )

LICENSE: LGPL

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (LGPL) as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA,
or see http://www.gnu.org/copyleft/lesser.html
*/</span>

<span class="comment">/**
 * <span class="attrib">@class</span> A Node is the base class for all figures which can have {<span class="attrib">@link</span> draw2d.Port}s. A {<span class="attrib">@link</span> draw2d.Port} is the 
 * anchor for a {<span class="attrib">@link</span> draw2d.Connection} line.&lt;br&gt;&lt;br&gt;&lt;b&gt;Hint:&lt;/b&gt; A {<span class="attrib">@link</span> draw2d.Port} is a green dot which can be draged and droped over another port.&lt;br&gt;
 *
 * <span class="attrib">@version</span> 0.9.26
 * <span class="attrib">@author</span> Andreas Herz
 * <span class="attrib">@constructor</span>
 */</span>
draw2d.Node=<span class="reserved">function</span>()
{
  <span class="comment">/** <span class="attrib">@private</span> **/</span>
  <span class="reserved">this</span>.bgColor = null;
  <span class="comment">/** <span class="attrib">@private</span> **/</span>
  <span class="reserved">this</span>.lineColor = new  draw2d.Color(128,128,255);
  <span class="comment">/** <span class="attrib">@private</span> **/</span>
  <span class="reserved">this</span>.lineStroke=1;
  <span class="comment">/** <span class="attrib">@private</span>*/</span>
  <span class="reserved">this</span>.ports = new draw2d.ArrayList();
  draw2d.Figure.call(<span class="reserved">this</span>);
};

draw2d.Node.<span class="reserved">prototype</span> = new draw2d.Figure();
<span class="comment">/** <span class="attrib">@private</span> **/</span>
draw2d.Node.<span class="reserved">prototype</span>.type=<span class="literal">"draw2d.Node"</span>;


<span class="comment">/**
 * <span class="attrib">@private</span>
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.dispose=<span class="reserved">function</span>()
{
  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
     <span class="reserved">this</span>.ports.get(i).dispose();
  }
  <span class="reserved">this</span>.ports = null;
  draw2d.Figure.<span class="reserved">prototype</span>.dispose.call(<span class="reserved">this</span>);
};

<span class="comment">/**
 * <span class="attrib">@private</span>
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.createHTMLElement=<span class="reserved">function</span>()
{
    var item =draw2d.Figure.<span class="reserved">prototype</span>.createHTMLElement.call(<span class="reserved">this</span>);
    item.style.width=<span class="literal">"auto"</span>;
    item.style.height=<span class="literal">"auto"</span>;
    item.style.margin=<span class="literal">"0px"</span>;
    item.style.padding=<span class="literal">"0px"</span>;
    <span class="reserved">if</span>(<span class="reserved">this</span>.lineColor!==null)
      item.style.border= <span class="reserved">this</span>.lineStroke+<span class="literal">"px solid "</span>+<span class="reserved">this</span>.lineColor.getHTMLStyle();
    item.style.fontSize=<span class="literal">"1px"</span>;
    <span class="reserved">if</span>(<span class="reserved">this</span>.bgColor!==null)
      item.style.backgroundColor=<span class="reserved">this</span>.bgColor.getHTMLStyle();
    <span class="reserved">return</span> item;
};

<span class="comment">/**
 * <span class="attrib">@private</span>
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.paint=<span class="reserved">function</span>()
{
  draw2d.Figure.<span class="reserved">prototype</span>.paint.call(<span class="reserved">this</span>);

  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
     <span class="reserved">this</span>.ports.get(i).paint();
  }
};

<span class="comment">/**
 * Return all ports of the node.
 *
 * <span class="attrib">@type</span>  draw2d.ArrayList
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getPorts=<span class="reserved">function</span>()
{
  <span class="reserved">return</span> <span class="reserved">this</span>.ports;
};


<span class="comment">/**
 * Return all input ports of the node.
 *
 * <span class="attrib">@since</span> 0.9.18
 * <span class="attrib">@type</span>  draw2d.ArrayList
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getInputPorts=<span class="reserved">function</span>()
{
  var result = new draw2d.ArrayList();
  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
   var port = <span class="reserved">this</span>.ports.get(i);
   <span class="reserved">if</span>(port instanceof draw2d.InputPort)
      result.add(port);
  }
  <span class="reserved">return</span> result;
};

<span class="comment">/**
 * Return all output ports of the node.
 *
 * <span class="attrib">@since</span> 0.9.18
 * <span class="attrib">@type</span>  draw2d.ArrayList
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getOutputPorts=<span class="reserved">function</span>()
{
  var result = new draw2d.ArrayList();
  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
   var port = <span class="reserved">this</span>.ports.get(i);
   <span class="reserved">if</span>(port instanceof draw2d.OutputPort)
      result.add(port);
  }
  <span class="reserved">return</span> result;
};

<span class="comment">/**
 * Return the port with the corresponding name.
 *
 * <span class="attrib">@see</span> draw2d.Port#getName
 * <span class="attrib">@see</span> draw2d.Port#setName
 * <span class="attrib">@param</span> {String} portName The name of the port to return.
 * <span class="attrib">@return</span> Returns the port with the hands over name or null.
 * <span class="attrib">@type</span> draw2d.Port
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getPort= <span class="reserved">function</span>(<span class="comment">/*:String*/</span> portName)
{
  <span class="reserved">if</span>(<span class="reserved">this</span>.ports===null)
    <span class="reserved">return</span> null;
  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
   var port = <span class="reserved">this</span>.ports.get(i);
   <span class="reserved">if</span>(port.getName() == portName)
      <span class="reserved">return</span> port;
  }
};

<span class="comment">/**
 * Return the input port with the corresponding name.
 *
 * <span class="attrib">@see</span> draw2d.Port#getName
 * <span class="attrib">@see</span> draw2d.Port#setName
 * <span class="attrib">@param</span> {String} portName The name of the port to return.
 * <span class="attrib">@return</span> Returns the port with the hands over name or null.
 * <span class="attrib">@since</span> 0.9.18
 * <span class="attrib">@type</span> draw2d.InputPort
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getInputPort= <span class="reserved">function</span>(<span class="comment">/*:String*/</span> portName)
{
  <span class="reserved">if</span>(<span class="reserved">this</span>.ports===null)
    <span class="reserved">return</span> null;
  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
   var port = <span class="reserved">this</span>.ports.get(i);
   <span class="reserved">if</span>(port.getName() == portName &amp;&amp; port instanceof draw2d.InputPort)
      <span class="reserved">return</span> port;
  }
};

<span class="comment">/**
 * Return the output port with the corresponding name.
 *
 * <span class="attrib">@see</span> draw2d.Port#getName
 * <span class="attrib">@see</span> draw2d.Port#setName
 * <span class="attrib">@param</span> {String} portName The name of the port to return.
 * <span class="attrib">@return</span> Returns the port with the hands over name or null.
 * <span class="attrib">@since</span> 0.9.18
 * <span class="attrib">@type</span> draw2d.OutputPort
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getOutputPort= <span class="reserved">function</span>(<span class="comment">/*:String*/</span> portName)
{
  <span class="reserved">if</span>(<span class="reserved">this</span>.ports===null)
    <span class="reserved">return</span> null;
  <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
  {
   var port = <span class="reserved">this</span>.ports.get(i);
   <span class="reserved">if</span>(port.getName() == portName &amp;&amp; port instanceof draw2d.OutputPort)
      <span class="reserved">return</span> port;
  }
};

<span class="comment">/**
 * Add a port to this node at the given position.&lt;br&gt;
 *
 * <span class="attrib">@param</span> {draw2d.Port} port The new port to add.
 * <span class="attrib">@param</span> {int}  x The x position.
 * <span class="attrib">@param</span> {int}  y The y position.
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.addPort=<span class="reserved">function</span>(<span class="comment">/*:draw2d.Port*/</span> port, <span class="comment">/*:int*/</span> x, <span class="comment">/*:int*/</span>y)
{
  <span class="reserved">this</span>.ports.add(port);
  port.setOrigin(x,y);
  port.setPosition(x,y);
  port.setParent(<span class="reserved">this</span>);
  <span class="comment">// You can't delete a port with the [DEL] key if a port is a child of a node</span>
  port.setDeleteable(false);

  <span class="reserved">this</span>.html.appendChild(port.getHTMLElement());
  <span class="reserved">if</span>(<span class="reserved">this</span>.workflow!==null)
  {
    <span class="reserved">this</span>.workflow.registerPort(port);
  }
};

<span class="comment">/**
 * Removes a port and all related connections from this node.&lt;br&gt;
 *
 * <span class="attrib">@param</span> {draw2d.Port} port The port to remove.
 *
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.removePort=<span class="reserved">function</span>(<span class="comment">/*:draw2d.Port*/</span> port)
{
  <span class="reserved">if</span>(<span class="reserved">this</span>.ports!==null)
    <span class="reserved">this</span>.ports.remove(port);
  try
  {
    <span class="reserved">this</span>.html.removeChild(port.getHTMLElement());
  }
  catch(exc)
  {
    <span class="comment">// es kann sein, dass es noch nicht eingeh�ngt wurde</span>
  }
  <span class="reserved">if</span>(<span class="reserved">this</span>.workflow!==null)
    <span class="reserved">this</span>.workflow.unregisterPort(port);

  <span class="comment">// remove the related connections of the port too.</span>
  var connections = port.getConnections();
  <span class="reserved">for</span> (var i = 0; i &lt; connections.getSize(); ++i)
  {
    <span class="reserved">this</span>.workflow.removeFigure(connections.get(i));
  }
};

<span class="comment">/**
 * <span class="attrib">@private</span>
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.setWorkflow= <span class="reserved">function</span>(<span class="comment">/*:draw2d.Workflow*/</span> workflow)
{
  var oldWorkflow = <span class="reserved">this</span>.workflow;
  draw2d.Figure.<span class="reserved">prototype</span>.setWorkflow.call(<span class="reserved">this</span>,workflow);

  <span class="reserved">if</span>(oldWorkflow!==null)
  {
      <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
      {
         oldWorkflow.unregisterPort(<span class="reserved">this</span>.ports.get(i));
      }
  }

  <span class="reserved">if</span>(<span class="reserved">this</span>.workflow!==null)
  {
      <span class="reserved">for</span>(var i=0;i&lt;<span class="reserved">this</span>.ports.getSize();i++)
      {
         <span class="reserved">this</span>.workflow.registerPort(<span class="reserved">this</span>.ports.get(i));
      }
  }
};

<span class="comment">/**
 * Set the background color of the node.
 *
 * <span class="attrib">@param</span> {draw2d.Color} color
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.setBackgroundColor= <span class="reserved">function</span>(<span class="comment">/*:draw2d.Color*/</span> color)
{
  <span class="reserved">this</span>.bgColor = color;
  <span class="reserved">if</span>(<span class="reserved">this</span>.bgColor!==null)
    <span class="reserved">this</span>.html.style.backgroundColor=<span class="reserved">this</span>.bgColor.getHTMLStyle();
  <span class="reserved">else</span>
    <span class="reserved">this</span>.html.style.backgroundColor=<span class="literal">"transparent"</span>;
};

<span class="comment">/**
 * Get the background color of the node.
 *
 * <span class="attrib">@type</span> draw2d.Color
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.getBackgroundColor= <span class="reserved">function</span>()
{
  <span class="reserved">return</span> <span class="reserved">this</span>.bgColor;
};

<span class="comment">/**
 * <span class="attrib">@see</span> draw2d.Figure#setBorder
 * <span class="attrib">@deprecated</span>
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.setColor= <span class="reserved">function</span>(<span class="comment">/*:draw2d.Color*/</span> color)
{
  <span class="reserved">this</span>.lineColor = color;
  <span class="reserved">if</span>(<span class="reserved">this</span>.lineColor!==null)
     <span class="reserved">this</span>.html.style.border= <span class="reserved">this</span>.lineStroke+<span class="literal">"px solid "</span>+<span class="reserved">this</span>.lineColor.getHTMLStyle();
  <span class="reserved">else</span>
     <span class="reserved">this</span>.html.style.border= <span class="literal">"0px"</span>;
};


<span class="comment">/**
 * <span class="attrib">@see</span> draw2d.Figure#setBorder
 * <span class="attrib">@deprecated</span> use setBorder instead
 **/</span>
draw2d.Node.<span class="reserved">prototype</span>.setLineWidth=<span class="reserved">function</span>(<span class="comment">/*:int*/</span> w)
{
  <span class="reserved">this</span>.lineStroke=w;
  <span class="reserved">if</span>(<span class="reserved">this</span>.lineColor!==null)
     <span class="reserved">this</span>.html.style.border= <span class="reserved">this</span>.lineStroke+<span class="literal">"px solid "</span>+<span class="reserved">this</span>.lineColor.getHTMLStyle();
  <span class="reserved">else</span>
     <span class="reserved">this</span>.html.style.border= <span class="literal">"0px"</span>;
};

<span class="comment">/**
 * Returns the List of the connection model objects for which this Figure's model is the source. 
 * Callers must not modify the returned List. &lt;br&gt;
 * Only called if you use the MVC pattern of Draw2D&lt;br&gt;
 *
 * <span class="attrib">@type</span> draw2d.ArrayList
 * <span class="attrib">@return</span> the List of model source connections
 * <span class="attrib">@since</span> 0.9.15
 * <span class="attrib">@abstract</span>
 */</span>
draw2d.Node.<span class="reserved">prototype</span>.getModelSourceConnections=<span class="reserved">function</span>()
{
   throw <span class="literal">"You must override the method [Node.prototype.getModelSourceConnections]"</span>
};

<span class="comment">/**
 * Only called if you use the MVC pattern of Draw2D&lt;br&gt;
 * <span class="attrib">@since</span> 0.9.15
 * <span class="attrib">@private</span>
 * <span class="attrib">@final</span>
 */</span>
draw2d.Node.<span class="reserved">prototype</span>.refreshConnections=<span class="reserved">function</span>()
{
   <span class="comment">// notify the view that the element has been changed</span>
   <span class="reserved">if</span>(<span class="reserved">this</span>.workflow!==null)
      <span class="reserved">this</span>.workflow.refreshConnections(<span class="reserved">this</span>);
};
</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Mon Nov 14 13:45:39 2011</div>
</body>
</html>
